package com.qiandao.xuexitong.controller;

import com.qiandao.xuexitong.common.Result;
import com.qiandao.xuexitong.util.AmapUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 通用控制器
 */
@RestController
@RequestMapping("/api/common")
@RequiredArgsConstructor
public class CommonController {
    
    private final AmapUtil amapUtil;
    
    /**
     * 获取高德地图配置
     */
    @GetMapping("/amap/config")
    public Result<Map<String, String>> getAmapConfig() {
        return Result.success(amapUtil.getConfig());
    }
} 